package com.bestv.search.common.service.impl;

import com.bestv.search.common.dao.ChannelDao;
import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.Channel;
import com.bestv.search.common.service.ChannelManager;

/**
 * @author Michael Wang
 */
public class ChannelManagerImpl implements ChannelManager {

    private ChannelDao channelDao;

    public ChannelDao getChannelDao() {
        return channelDao;
    }

    public void setChannelDao(ChannelDao channelDao) {
        this.channelDao = channelDao;
    }

    @Override
    public Channel getChannelByName(DataSourceKey key, String name) {
        return channelDao.getChannelByName(name);
    }

    @Override
    public Channel getChannelByCode(DataSourceKey key, String code) {
        return channelDao.getChannelByCode(code);
    }
}
